public class Main {
    public static void main(String[] args) {
        Rational one = new Rational();
        Rational two = new Rational();
        one.setFenzi(2);
        one.setFenmu(3);

        two.setFenzi(3);
        two.setFenmu(4);

        System.out.println(one.getFenzi()+"/"+one.getFenmu()+"+"+two.getFenzi()+"/"+two.getFenmu()+"= "+one.add(two).fenzi+"/"+one.add(two).fenmu);
        System.out.println(one.getFenzi()+"/"+one.getFenmu()+"-"+two.getFenzi()+"/"+two.getFenmu()+"= "+one.sub(two).fenzi+"/"+one.sub(two).fenmu);
        System.out.println("("+one.getFenzi()+"/"+one.getFenmu()+")"+"*"+"("+two.getFenzi()+"/"+two.getFenmu()+")"+"= "+one.muti(two).fenzi+"/"+one.muti(two).fenmu);
        System.out.println("("+one.getFenzi()+"/"+one.getFenmu()+")"+"/"+"("+two.getFenzi()+"/"+two.getFenmu()+")"+"= "+one.div(two).fenzi+"/"+one.div(two).fenmu);
    }
}
